home *** CD-ROM | disk | FTP | other *** search
- Path: maine.maine.edu!io92118
- Organization: University of Maine System
- Date: Sun, 3 Mar 1996 15:22:25 EST
- From: <IO92118@MAINE.MAINE.EDU>
- Message-ID: <96063.152225IO92118@MAINE.MAINE.EDU>
- Newsgroups: comp.lang.c++
- Subject: What's wrong with this program under Borland C++ 4.52?
-
- I typed in a first sample program for window programming.
-
- I did everything as book says, but it doesn't work.
-
- What's wrong with it?
-
- I check several examples in BC45 for OWL.
-
- It looks like I should use #include <owl/applicat.h>
- #include <owl/framewin.h>
-
- I changed HANDLE with HINSTANCE, it doesn't work.
- I tried almost all the combination to do anything I can.
- If you happen the problems, could you mail to me?
- Thank you very much for your help!!!
-
- han
-
- The following is program:
- //****************************************************************************
- #include <owl.h>
-
- class TSampApp : public TApplication {
- public:
- TSampApp(LPSTR AName, HANDLE hInstance, HANDLE hPrevInstance, LPSTR
- lpCmdLine, int nCmdShow) : TApplication(AName, hInstance, hPrevInstance,
- lpCmdLine,
- nCmdShow) {};
- virtual void InitMainWindow();
- };
-
- void TSampApp::InitMainWindow()
- {
-
- MainWindow = new TWindow(NULL, Name);
-
- }
-
- int PASCAL WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine,
- int nCmdShow)
- {
- TSampApp SampApp ("SAMPLE WINDOW", hInstance, hPrevInstance,lpCmdLine,
- nCmdShow);
-
- SampApp.Run();
-
- return SampApp.Status;
-
- }
-
-